{# Upstream favors DeviceTree, force it to use ACPI #}
{% set kernel_options %}
  {% if ARCH == "aarch64" %}acpi=force{% endif %}
{% endset %}
{% set distro_requires %}
  <distro_family op="=" value="Fedora41"/>
  <distro_variant op="=" value="Server"/>
  <distro_name op="=" value="Fedora-41"/>
{% endset %}
{# don't enable updates repo for provision to avoid any updated package that can break installation #}
{% set ks_meta = "no_updates_repos" %}
{% set host_requires %}
  {# NOTE(rasibley): Exclude broken ppc64le machines which frequently abort #}
  {% if ARCH == "ppc64le" %}
    <not>
      <or>
        <hostname op="like" value="ibm-p9b-21%"/>
        <hostname op="like" value="ibm-p9b-11%"/>
        <hostname op="like" value="netqe-p9-01%"/>
      </or>
    </not>
    {# NOTE:(bgoncalv) exclude Power9 baremetal machines as they are not supported #}
    <not>
      {% include "host_types/power9_baremetal.host_requires.xml.j2" %}
    </not>
  {% endif %}
  {# NOTE(rasibley): Exclude x86_64 machines which frequently abort on upstream jobs #}
  {% if ARCH == "x86_64" %}
    <not>
      <or>
        <hostname op="like" value="intel-sugarbay-dh%"/>
        <hostname op="like" value="cisco-c240m3-01.khw2%"/>
      </or>
    </not>
  {% endif %}
  {% if ARCH == "aarch64" %}
    <not>
      <or>
        {# NOTE(rasibley): Exclude aarch64 systems which frequently abort due to firmware quirks #}
        <hostname op="like" value="huawei%"/>
        <hostname op="like" value="hp%moonshot-%"/>
        <hostname op="like" value="cav-thunderx%"/>
        {# NOTE(rasibley): Exclude Cavium Thunder systems which fail to install #}
        {# NOTE(rasibley): https://github.com/linuxkit/linuxkit/issues/2434 #}
        <cpu>
          <vendor op="like" value="%CN8890%"/>
        </cpu>
      </or>
    </not>
  {% endif %}
{% endset %}
{% set ks_append | unindent %}
  <ks_append><![CDATA[
  %post
  set -x
  LVNAME=$(lvs -o lv_name,vg_name --noheadings | awk '/root/ {print $1}')
  VGNAME=$(lvs -o lv_name,vg_name --noheadings | awk '/root/ {print $NF}')
  lvextend -l +100%FREE /dev/${VGNAME}/${LVNAME}
  xfs_growfs /

  # enable updates repo so tests can use latest packages
  dnf config-manager --enable updates
  %end
  ]]></ks_append>
{% endset %}
